package yhp.service.impl;

import yhp.dao.UserDao;
import yhp.dao.impl.UserDaoImpl;
import yhp.service.UserService;

public class UserServiceImpl implements UserService {
    private static UserDao dao;
    static{
        dao = new UserDaoImpl();
    }
    @Override
    public int sum() {
        return dao.sum();
    }

    @Override
    public boolean findByUserName(String userName) {
        return dao.findByUserName(userName);
    }

    @Override
    public void changePraiseStatus(String userName, int praiseStatus) {
        dao.changePraiseStatus(userName,praiseStatus);
    }

    @Override
    public boolean insert(String userName, String userPassword) {
        return dao.insert(userName,userPassword);
    }

    @Override
    public int getPraiseStatus(String userName) {
        return dao.getPraiseStatus(userName);
    }
}

